#函数的返回值
def calc_sum(beg, end):
    theSum = 0
    for i in range(beg, end+1):
        theSum += i
    print(theSum)
calc_sum(1,100)

def calc_sum(beg, end):
    theSum = 0
    for i in range(beg, end+1):
        theSum += i
    return theSum
result = calc_sum(1,100)
print(result)

def is_odd(num):
    if num % 2 == 0:
        return True
    return False
for_1 = is_odd(1)
for_2 = is_odd(2)
print(for_1, for_2)